<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>std.cstream</title>
  <link href="./css/style.css" rel="stylesheet" type="text/css"/>
  <!-- <link href="./img/icon.png" rel="icon" type="image/png"/> -->
  <script type="text/javascript" src="./js/jquery.js"></script>
  <script type="text/javascript" src="./js/modules.js"></script>
  <script type="text/javascript" src="./js/quicksearch.js"></script>
  <script type="text/javascript" src="./js/navigation.js"></script>
  <!--<script type="text/javascript" src="./js/jquery.treeview.js"></script>-->
  <script type="text/javascript">
    var g_moduleFQN = "std.cstream";
  </script>
  
</head>
<body>
<div id="content">
  <h1><a href="./htmlsrc/std.cstream.html" class="symbol">std.cstream</a></h1>
  
<div class="summary">The std.cstream module bridges std.c.stdio (or std.stdio) and std.stream.
 Both std.c.stdio and std.stream are publicly imported by std.cstream.</div>
<p class="sec_header">Authors:</p>Ben Hinkle
<p class="sec_header">License:</p>Public Domain
<dl>
<dt class="decl">class <a class="symbol _class" name="CFile" href="./htmlsrc/std.cstream.html#L20" kind="class" beg="20" end="207">CFile</a> : Stream; <a title="Permalink to this symbol" href="#CFile" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.cstream.html#L20">#</a></dt>
<dd class="ddef">
<div class="summary">A Stream wrapper for a C file of type FILE*.</div>
<dl>
<dt class="decl">FILE* <a class="symbol _variable" name="CFile.cfile" href="./htmlsrc/std.cstream.html#L21" kind="variable" beg="21" end="21">cfile</a>; <a title="Permalink to this symbol" href="#CFile.cfile" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.cstream.html#L21">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _ctor" name="CFile.this" href="./htmlsrc/std.cstream.html#L30" kind="ctor" beg="30" end="36">this</a><span class="params">(FILE* <em>cfile</em>, FileMode <em>mode</em>, bool <em>seekable</em> = false)</span>; <a title="Permalink to this symbol" href="#CFile.this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.cstream.html#L30">#</a></dt>
<dd class="ddef">
<div class="summary">Create the stream wrapper for the given C file.</div>
<p class="sec_header">Params:</p>
<table class="params">
<tr><td><em>mode</em></td><td>a bitwise combination of <b>FileMode.In</b> for a readable file
          and <b>FileMode.Out</b> for a writeable file.</td></tr>
<tr><td><em>seekable</em></td><td>indicates if the stream should be _seekable.</td></tr></table></dd>
<dt class="decl"><a class="symbol _dtor" name="CFile.~this" href="./htmlsrc/std.cstream.html#L41" kind="dtor" beg="41" end="41">~this</a>(); <a title="Permalink to this symbol" href="#CFile.~this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.cstream.html#L41">#</a></dt>
<dd class="ddef">
<div class="summary">Closes the stream.</div></dd>
<dt class="decl">FILE* <a class="symbol _function" name="CFile.file" href="./htmlsrc/std.cstream.html#L47" kind="function" beg="47" end="47">file</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#CFile.file" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.cstream.html#L47">#</a></dt>
<dt class="decl">void <a class="symbol _function" name="CFile.file:2" href="./htmlsrc/std.cstream.html#L52" kind="function" beg="52" end="55">file</a><span class="params">(FILE* <em>cfile</em>)</span>; <a title="Permalink to this symbol" href="#CFile.file:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.cstream.html#L52">#</a></dt>
<dd class="ddef">
<div class="summary">Property to get or set the underlying file for this stream.
 Setting the file marks the stream as open.</div></dd>
<dt class="decl">void <a class="symbol _function" name="CFile.flush" href="./htmlsrc/std.cstream.html#L61" kind="function" beg="61" end="61">flush</a><span class="params">()</span>; <span class="attrs">[<span class="stc">override</span>]</span> <a title="Permalink to this symbol" href="#CFile.flush" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.cstream.html#L61">#</a></dt>
<dt class="decl">void <a class="symbol _function" name="CFile.close" href="./htmlsrc/std.cstream.html#L66" kind="function" beg="66" end="70">close</a><span class="params">()</span>; <span class="attrs">[<span class="stc">override</span>]</span> <a title="Permalink to this symbol" href="#CFile.close" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.cstream.html#L66">#</a></dt>
<dt class="decl">bool <a class="symbol _function" name="CFile.eof" href="./htmlsrc/std.cstream.html#L75" kind="function" beg="75" end="77">eof</a><span class="params">()</span>; <span class="attrs">[<span class="stc">override</span>]</span> <a title="Permalink to this symbol" href="#CFile.eof" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.cstream.html#L75">#</a></dt>
<dt class="decl">char <a class="symbol _function" name="CFile.getc" href="./htmlsrc/std.cstream.html#L82" kind="function" beg="82" end="84">getc</a><span class="params">()</span>; <span class="attrs">[<span class="stc">override</span>]</span> <a title="Permalink to this symbol" href="#CFile.getc" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.cstream.html#L82">#</a></dt>
<dt class="decl">char <a class="symbol _function" name="CFile.ungetc" href="./htmlsrc/std.cstream.html#L89" kind="function" beg="89" end="91">ungetc</a><span class="params">(char <em>c</em>)</span>; <span class="attrs">[<span class="stc">override</span>]</span> <a title="Permalink to this symbol" href="#CFile.ungetc" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.cstream.html#L89">#</a></dt>
<dt class="decl">size_t <a class="symbol _function" name="CFile.readBlock" href="./htmlsrc/std.cstream.html#L96" kind="function" beg="96" end="100">readBlock</a><span class="params">(void* <em>buffer</em>, size_t <em>size</em>)</span>; <span class="attrs">[<span class="stc">override</span>]</span> <a title="Permalink to this symbol" href="#CFile.readBlock" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.cstream.html#L96">#</a></dt>
<dt class="decl">size_t <a class="symbol _function" name="CFile.writeBlock" href="./htmlsrc/std.cstream.html#L105" kind="function" beg="105" end="107">writeBlock</a><span class="params">(const void* <em>buffer</em>, size_t <em>size</em>)</span>; <span class="attrs">[<span class="stc">override</span>]</span> <a title="Permalink to this symbol" href="#CFile.writeBlock" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.cstream.html#L105">#</a></dt>
<dt class="decl">ulong <a class="symbol _function" name="CFile.seek" href="./htmlsrc/std.cstream.html#L112" kind="function" beg="112" end="117">seek</a><span class="params">(long <em>offset</em>, SeekPos <em>rel</em>)</span>; <span class="attrs">[<span class="stc">override</span>]</span> <a title="Permalink to this symbol" href="#CFile.seek" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.cstream.html#L112">#</a></dt>
<dt class="decl">void <a class="symbol _function" name="CFile.writeLine" href="./htmlsrc/std.cstream.html#L122" kind="function" beg="122" end="125">writeLine</a><span class="params">(const( char)[] <em>s</em>)</span>; <span class="attrs">[<span class="stc">override</span>]</span> <a title="Permalink to this symbol" href="#CFile.writeLine" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.cstream.html#L122">#</a></dt>
<dt class="decl">void <a class="symbol _function" name="CFile.writeLineW" href="./htmlsrc/std.cstream.html#L130" kind="function" beg="130" end="133">writeLineW</a><span class="params">(const( wchar)[] <em>s</em>)</span>; <span class="attrs">[<span class="stc">override</span>]</span> <a title="Permalink to this symbol" href="#CFile.writeLineW" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.cstream.html#L130">#</a></dt>
<dd class="ddef">
<div class="summary">Overrides of the <b>Stream</b> methods to call the underlying <b>FILE*</b>
 C functions.</div></dd>
<dt class="decl"><a class="symbol _unittest" name="CFile.unittest" href="./htmlsrc/std.cstream.html#L136" kind="unittest" beg="136" end="206">unittest</a>; <a title="Permalink to this symbol" href="#CFile.unittest" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.cstream.html#L136">#</a></dt>
</dl></dd>
<dt class="decl">CFile <a class="symbol _variable" name="din" href="./htmlsrc/std.cstream.html#L212" kind="variable" beg="212" end="212">din</a>; <a title="Permalink to this symbol" href="#din" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.cstream.html#L212">#</a></dt>
<dd class="ddef">
<div class="summary">CFile wrapper of std.c.stdio.stdin (not seekable).</div></dd>
<dt class="decl">CFile <a class="symbol _variable" name="dout" href="./htmlsrc/std.cstream.html#L217" kind="variable" beg="217" end="217">dout</a>; <a title="Permalink to this symbol" href="#dout" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.cstream.html#L217">#</a></dt>
<dd class="ddef">
<div class="summary">CFile wrapper of std.c.stdio.stdout (not seekable).</div></dd>
<dt class="decl">CFile <a class="symbol _variable" name="derr" href="./htmlsrc/std.cstream.html#L222" kind="variable" beg="222" end="222">derr</a>; <a title="Permalink to this symbol" href="#derr" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.cstream.html#L222">#</a></dt>
<dd class="ddef">
<div class="summary">CFile wrapper of std.c.stdio.stderr (not seekable).</div></dd>
<dt class="decl">static <a class="symbol _sctor" name="this" href="./htmlsrc/std.cstream.html#L224" kind="sctor" beg="224" end="229">this</a>(); <a title="Permalink to this symbol" href="#this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.cstream.html#L224">#</a></dt>
<dd class="ddef"></dd></dl>
</div>
<div id="footer">
  <p>Copyright © 1999-2008 by Digital Mars ®, All Rights Reserved.</p>
  <p>Page generated by <a href="http://code.google.com/p/dil">dil</a> on Sun Dec 28 04:26:38 2008. Rendered by <a href="http://code.google.com/p/dil/wiki/Kandil">kandil</a>.</p>
</div>
</body>
</html>